<?php if(!defined("PATH_HD"))exit;?>
<html>
	<head><title></title>
		<link href="http://localhost/company1/sccms/admin/tpl/source/css/style.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="http://localhost/company1/sccms/admin/tpl/source/js/jquery-1.7.2.min.js"></script>
		<script>
			$(function(){
				var code_src =$("#code").attr('src');
				$("#next").click(function(){
					var srcs =code_src+"&"+Math.random();
					$("#code").attr("src",srcs);
				});
				$("form").submit(function(){
				var data=$(this).serialize();
				$.ajax({
					url:"http://localhost/company1/index.php/admin/common/login",
					type:"post",
					data:data,
					dataType:"json",
					success:function(data){
						if(data['state']!=4){
							alert(data['msg']);
						}else{
							window.location.href="http://localhost/company1/index.php/admin/index";
						}
					}
				})
				return false;
	})
			})
		</script>
	</head>
	<body>
		<form action="http://localhost/company1/index.php/admin/common/login" method="post">
			<div class="login" >
			<table border='1' cellspacing='0' cellpadding='0' bordercolor='#f0ffff'>
				<tr>
					<th colspan='2'>
						<h2>后台管理员登陆</h2>
					</th>
				</tr>
				<tr>
					<td height='40px'>用户名：</td>
					<td><input type="text" name="uname"/></td>
				</tr>
				<tr>
					<td height='40px'>密&nbsp;&nbsp;码：</td>
					<td><input type="password" name="pwd"/></td>
				</tr>
				<tr>
					<td height='60px'>
						验证码：
					</td>
					<td><input type="text" name="code">
						<img src="http://localhost/company1/index.php/admin/common/code" id='code'>
						<a href="#" id="next">看不清，换一张</a>
					</td>
				</tr>
				<tr>
					<td colspan="2" align='center'>
						<input type="submit" value="登陆"/>
					</td>
				</tr>
			</table>
		</div>
		</form>
	</body>
</html>